/**create file hole
ls -lh: human usage, logical size 8k
du:disk usage,real usage 4k*/
#include<errno.h>
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
static unsigned char buf[4096];
int main(void)
{
	int fd,ret;
	fd=open("./test.txt",O_WRONLY|O_CREAT|O_EXCL,0644);
	if(-1==fd){
		perror("open error");
		return 1;
	}
	ret=lseek(fd,4096,SEEK_SET);
	if(-1==ret){
		perror("lseek error");
		close(fd);
		return 1;
	}
	ret=write(fd,buf,4096);
	if(-1==ret){
		perror("write error");
		close(fd);
		return 1;
	}
	printf("write %d bytes\n",ret);
	close(fd);
	return 0;
}
